/* 主题颜色 */
$primary-color: #8B5CF6;
$secondary-color: #EC4899;
$success-color: #10B981;
$warning-color: #F59E0B;
$error-color: #EF4444;
$text-primary: #1F2937;
$text-secondary: #6B7280;
$background-color: #F3F4F6;

/* 圆角 */
$border-radius-sm: 8rpx;
$border-radius-md: 12rpx;
$border-radius-lg: 16rpx;
$border-radius-xl: 24rpx;

/* 阴影 */
$shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
$shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
$shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

/* 动画 */
@mixin transition-all {
    transition: all 0.3s ease;
}

/* 卡片样式 */
@mixin card {
    background: #FFFFFF;
    border-radius: $border-radius-lg;
    padding: 20rpx;
    box-shadow: $shadow-sm;
    @include transition-all;
    
    &:active {
        transform: scale(0.98);
    }
}

/* 按钮样式 */
@mixin button-primary {
    background: linear-gradient(135deg, $primary-color, $secondary-color);
    color: #FFFFFF;
    border-radius: $border-radius-md;
    padding: 20rpx 40rpx;
    font-weight: 600;
    @include transition-all;
    
    &:active {
        transform: translateY(2rpx);
        opacity: 0.9;
    }
}

/* 渐变背景 */
@mixin gradient-bg {
    background: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
}

/* 毛玻璃效果 */
@mixin glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 通用布局类 */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* 文字样式 */
.text-h1 {
    font-size: 40rpx;
    font-weight: 600;
    color: $text-primary;
}

.text-h2 {
    font-size: 32rpx;
    font-weight: 600;
    color: $text-primary;
}

.text-body {
    font-size: 28rpx;
    color: $text-secondary;
}

.text-small {
    font-size: 24rpx;
    color: $text-secondary;
}

/* 间距 */
.mt-10 { margin-top: 10rpx; }
.mt-20 { margin-top: 20rpx; }
.mt-30 { margin-top: 30rpx; }
.mb-10 { margin-bottom: 10rpx; }
.mb-20 { margin-bottom: 20rpx; }
.mb-30 { margin-bottom: 30rpx; }
.mx-10 { margin-left: 10rpx; margin-right: 10rpx; }
.mx-20 { margin-left: 20rpx; margin-right: 20rpx; }
.my-10 { margin-top: 10rpx; margin-bottom: 10rpx; }
.my-20 { margin-top: 20rpx; margin-bottom: 20rpx; }

/* 动画类 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 20rpx;
    background: rgba(0, 0, 0, 0.1);
    border-radius: $border-radius-sm;
    overflow: hidden;
    
    .progress {
        height: 100%;
        border-radius: $border-radius-sm;
        transition: width 0.3s ease;
    }
}

/* 徽章样式 */
.badge {
    position: absolute;
    top: -8rpx;
    right: -8rpx;
    min-width: 32rpx;
    height: 32rpx;
    line-height: 32rpx;
    text-align: center;
    background: $error-color;
    color: #FFFFFF;
    border-radius: 16rpx;
    font-size: 20rpx;
    padding: 0 6rpx;
}
